﻿using Furion.DatabaseAccessor;
using LuoYi.Core.Entities;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace LuoYi.Admin.Entities;

/// <summary>
/// 代码生成业务表
/// </summary>
[Table("gen_table")]
public class GenTable : IEntity
{
    /// <summary>
    /// 编号
    /// </summary>
    [Key]
    [Column("table_id", TypeName = "bigint(20)")]
    public long TableId { get; set; }

    /// <summary>
    /// 表名称
    /// </summary>
    [Column("table_name")]
    [StringLength(200)]
    public string? TableName { get; set; }

    /// <summary>
    /// 表描述
    /// </summary>
    [Column("table_comment")]
    [StringLength(500)]
    public string? TableComment { get; set; }

    /// <summary>
    /// 关联子表的表名
    /// </summary>
    [Column("sub_table_name")]
    [StringLength(64)]
    public string? SubTableName { get; set; }

    /// <summary>
    /// 子表关联的外键名
    /// </summary>
    [Column("sub_table_fk_name")]
    [StringLength(64)]
    public string? SubTableFkName { get; set; }

    /// <summary>
    /// 实体类名称
    /// </summary>
    [Column("class_name")]
    [StringLength(100)]
    public string? ClassName { get; set; }

    /// <summary>
    /// 使用的模板（crud单表操作 tree树表操作）
    /// </summary>
    [Column("tpl_category")]
    [StringLength(200)]
    public string? TplCategory { get; set; }

    /// <summary>
    /// 前端模板类型（element-ui模版 element-plus模版）
    /// </summary>
    [Column("tpl_web_type")]
    [StringLength(30)]
    public string? TplWebType { get; set; }

    /// <summary>
    /// 生成包路径
    /// </summary>
    [Column("package_name")]
    [StringLength(100)]
    public string? PackageName { get; set; }

    /// <summary>
    /// 生成模块名
    /// </summary>
    [Column("module_name")]
    [StringLength(30)]
    public string? ModuleName { get; set; }

    /// <summary>
    /// 生成业务名
    /// </summary>
    [Column("business_name")]
    [StringLength(30)]
    public string? BusinessName { get; set; }

    /// <summary>
    /// 生成功能名
    /// </summary>
    [Column("function_name")]
    [StringLength(50)]
    public string? FunctionName { get; set; }

    /// <summary>
    /// 生成功能作者
    /// </summary>
    [Column("function_author")]
    [StringLength(50)]
    public string? FunctionAuthor { get; set; }

    /// <summary>
    /// 生成代码方式（0zip压缩包 1自定义路径）
    /// </summary>
    [Column("gen_type")]
    [StringLength(1)]
    public string? GenType { get; set; }

    /// <summary>
    /// 生成路径（不填默认项目路径）
    /// </summary>
    [Column("gen_path")]
    [StringLength(200)]
    public string? GenPath { get; set; }

    /// <summary>
    /// 其它生成选项
    /// </summary>
    [Column("options")]
    [StringLength(1000)]
    public string? Options { get; set; }

    /// <summary>
    /// 创建者
    /// </summary>
    [Column("create_by")]
    [StringLength(64)]
    public string? CreateBy { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Column("create_time", TypeName = "datetime")]
    public DateTime? CreateTime { get; set; }

    /// <summary>
    /// 更新者
    /// </summary>
    [Column("update_by")]
    [StringLength(64)]
    public string? UpdateBy { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    [Column("update_time", TypeName = "datetime")]
    public DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [Column("remark")]
    [StringLength(500)]
    public string? Remark { get; set; }
}
